<template>
    <div class="collection">
        <van-nav-bar
        title="我的收藏"
        left-text="返回"
        left-arrow
        @click-left="onClickLeft"
        />
        <!-- <van-list
        :finished="finished"
        @load="onLoad"
        :offset=100
        > -->
        <Jobitem v-for="(item,index) in jobList" :jobDetail=item :key="index" />
        <div style="color:#999;width:100%;vertical-align:center" v-if="!jobList">Opps~暂无数据</div>
        <!-- </van-list> -->
        <div style="height:120px"></div>
    </div>
</template>
<script>
import Config from './project.config'
import Jobitem from './jobitem'
export default {
  components:{
    Jobitem
  },
  data() {
    return {
      finished: true,
      jobList: []
    };
  },
  methods: {
    onLoad() {
        this.$http.get(Config.baseUrl+ '/api/user/position/collections').then(
          function(rsp){
            if(rsp.data.code == 1){
              
              console.log(rsp.data.code == 1)
              this.jobList = rsp.data.data
            }

          },
          function(error){
            console.log(error)
          }
        )
    },
    onClickLeft() {
      this.$router.go(-1);
    }
  },
  mounted() {
    this.onLoad()
  },
};
</script>

